<template>
   <swiper :options="swiperOption" class="swiper1" v-if="swiperleng">
    <!-- slides -->
    <swiper-slide v-for="item of NewSwiperList" :key="item.id">
      <img :src="item.imgUrl" alt="">
    </swiper-slide>
    <!-- Optional controls -->
    <div class="swiper-pagination"  slot="pagination"></div>
  </swiper>
</template>

<script>
export default {
  name: 'HomeSwiper',
  props: ['NewSwiperList'],
  data () {
    return {
      swiperOption: {
        pagination: '.swiper-pagination',
        loop: true
      },
      swiperList: []
    }
  },
  methods: {
    getdata: function () {
    }
  },
  computed: {
    swiperleng: function () {
      return this.NewSwiperList.length
    }
  },
  mounted () {
    this.getdata()
  }
}
</script>

<style lang="stylus" scoped>
  .swiper1 >>> .swiper-pagination-bullet-active
    background: #fff
  .swiper1
    overflow: hidden
    width: 100%
    height: 0
    padding-bottom:26.7%
    img
      width: 100%
</style>
